package com.zzld.modules.autoinn.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zzld.core.service.BaseServiceImpl;
import com.zzld.modules.autoinn.entity.Collect;
import com.zzld.modules.autoinn.entity.Store;
import com.zzld.modules.autoinn.mapper.CollectMapper;
import com.zzld.modules.autoinn.service.ICollectService;

@Service("collectService")
public class CollectServiceImpl extends BaseServiceImpl<Collect> implements ICollectService{

	@Autowired
	private CollectMapper collectMapper;
	
	/**
	 * 根据距离获取分页
	 * @param map
	 * @param PageNum
	 * @param PageSize
	 * @return
	 */
	public PageInfo<Store> selectOrderDistance(Map<String,Object> map,int PageNum,int PageSize){
		PageHelper.startPage(PageNum, PageSize);
		List<Store> list = collectMapper.selectByDistancecolec(map);
		PageInfo<Store> page = new PageInfo<Store>(list);
		return page;
	}


	
}
